Skip to content

feat(workbench): offer browser-managed PWA installation - #9199

Closed
maxliux5 wants to merge 1 commit into
mainfrom
codex/workbench-pwa-install
Closed

maxliux5 wants to merge 1 commit into
mainfrom
codex/workbench-pwa-install

Conversation

@maxliux5

Copy link
Copy Markdown
Collaborator

Result

Workbench previously relied on users finding Chrome’s installation menu. It now offers Install LoopX in the sidebar when the browser provides an installation event, with a persistent Settings entry for manual installation or recovery. Clicking invokes Chrome’s own consent UI; macOS and Windows Chrome use the same browser-owned flow.

“Not now” and canceled consent suppress promotion for seven days, including after reload and across tabs. An explicit Settings install remains available when the browser still offers it. Successful installation and standalone/titlebar-overlay windows hide promotion. Consumed or failed events cannot be reused; failure exposes menu guidance. Chinese, English and Japanese copy is included. The manifest retains its identity and adds 192/512 PNGs rendered from the existing blue brand SVG.

Ownership stays in the Workbench TypeScript frontend and the browser installation API; there is no backend, CLI, Lark, permission or cache/service-worker change. The shared browser-offer owner prevents the sidebar and Settings from consuming the same event twice. No unrelated refactor was needed. The only closed outcome vocabulary mirrors the browser’s accepted/dismissed result and remains local.

Validation and limits

Tested product revision: 458a7afbe0c8c0ac8f609d904b32de31a88fca24.

  • Initial scripts/init.sh --check: passed with an isolated daemon and fake agent.
  • npm run typecheck: passed across Workbench packages.
  • Frontend npm test -w @loopx/loochat-web: 609/609 passed, including 8 PWA tests.
  • npm run build: passed.
  • node --test packages/e2e/test/pwa-install.spec.mjs: 1/1 passed, covering four combinations of desktop/narrow and light/dark, cancellation, reload suppression, user activation, failure/recovery and installed readback.
  • Real packaged page: Chromium Page.getAppManifest reported no parse errors; Page.getInstallabilityErrors returned no errors.
  • git diff --check, public-boundary scan and staged bilingual RFC check: passed. The semantic diff advisory has no supported candidates; its scanner excludes apps/, so the browser outcome union was reviewed manually.
  • Full npm test is not a pass: it stalled in the existing daemon SSE long-history replay test. The unchanged daemon sources reproduce the stall in an isolated named-test run (30-second timeout, exit 124). No backend fix is bundled here.
  • Not yet verified: native installation/OS launch on macOS or Windows, or the installed production Workbench. Browser consent events in the interaction test are simulated; manifest checks use the real served assets. No deployment or merge is included.

Visual evidence

Packaged UI with a real isolated Workbench daemon, synthetic conversations and a synthetic expiring-login notice; Linux Chromium. The primary question is whether LoopX can be installed. The default view shows one short offer; troubleshooting stays in Settings. Long repeated session titles remain scrollable, and neither the install offer nor the expiry warning overlaps the list or each other. Before means the same revision without an installation offer; after means an eligible browser offer. Captures are stored in a separate revision-pinned evidence branch, outside the product tree.

Desktop, 1440 × 1000

Before eligibility Install offer
Before eligibility Install offer

Narrow, 390 × 844

Before eligibility Install offer
Before eligibility, narrow Install offer, narrow
Dark theme and failure recovery

Desktop dark
Narrow dark
Installation recovery
Narrow recovery

Implementation references: Excalidraw’s early event capture and Open WebUI’s browser-menu installation guidance. The former informs event ownership; the latter provides a recovery path when no install offer is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant